package ${packageName}.common.base.pojo.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author Long
 */
@Setter
@Getter
//作为实体父类要让子类拥有自己的属性（数据库表中），需要加此注解
@MappedSuperclass
public class IBaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @TableId(type = IdType.AUTO)
    @Column(name = "id", length = 20)
    protected Long id;

    /**
     *
     */
    @TableField(fill = FieldFill.INSERT)
    @Column(name = "create_time")
    protected Date createTime;

    /**
     *
     */
    @TableField(fill = FieldFill.UPDATE)
    @Column(name = "update_time")
    protected Date updateTime;
}
